package com.cs.mediator;

/**
 * @author Sam.Lee E-mail:lishanman2007@163.com
 * @version Created：Aug 29, 2011 1:45:12 PM
 */
public class ConcreteMediator implements Mediator {

	private ConcreteColleagueA colleagueA;
	private ConcreteColleagueB colleagueB;

	public void setColleagueA(ConcreteColleagueA colleagueA) {
		this.colleagueA = colleagueA;
	}

	public void setColleagueB(ConcreteColleagueB colleagueB) {
		this.colleagueB = colleagueB;
	}

	public void change(Colleague colleague) {
		if (colleague instanceof ConcreteColleagueA) {
			System.out.println("colleagueA做了一些动作改变，并且mediator向他人做出了通知...");
		} else if (colleague instanceof ConcreteColleagueB) {
			System.out.println("colleagueB做出了一些动作改变，并且mediator向他人做出了通知...");
		}
	}

}
